#ifndef KEYFRAMEINFORMATION_H
#define KEYFRAMEINFORMATION_H

#include <GL/glew.h>
#include <QObject>
#include <QGLViewer/qglviewer.h>
using namespace qglviewer;

#include <fstream>
using namespace std;

#include "camerapathnode.h"
#include "clipinformation.h"
#include "splineinformation.h"
#include "lightinginformation.h"

class KeyFrameInformation
{
 public :
  KeyFrameInformation();
  KeyFrameInformation(const KeyFrameInformation&);
  ~KeyFrameInformation();

  KeyFrameInformation& operator=(const KeyFrameInformation&);

  void clear();

  void load(fstream&);
  void save(fstream&);

  void setFrameNumber(int);
  void setPosition(Vec);
  void setOrientation(Quaternion);
  void setLut(float*);
  void setVolumeBounds(Vec, Vec);
  void set4dInfo(Vec, int);
  void setImage(QImage);
  void setSplineInfo(QList<SplineInformation>);
  void setMorphTF(bool);
  void setClipInfo(ClipInformation);
  void setLightInfo(LightingInformation);

  int frameNumber();
  Vec position();
  Quaternion orientation();
  void volumeBounds(Vec&, Vec&);
  void get4dInfo(Vec&, int&);
  QImage image();
  float* lut();
  QList<SplineInformation> splineInfo();
  bool morphTF();

  ClipInformation clipInfo();
  LightingInformation lightInfo();

  // -- keyframe interpolation parameters
  void setInterpTF(int);
  void setInterpVolumeBounds(int);
  void setInterpCameraPosition(int);
  void setInterpCameraOrientation(int);
  void setInterpClipInfo(int);
  void setInterpLightInfo(int);

  int interpTF();
  int interpVolumeBounds();
  int interpCameraPosition();
  int interpCameraOrientation();
  int interpClipInfo();
  int interpLightInfo();

 private :
  int m_frameNumber;
  Vec m_position;
  Quaternion m_rotation;
  Vec m_volMin, m_volMax;
  Vec m_boxsize4d;
  int m_timestep;
  QImage m_image;
  float *m_lut;
  QList<SplineInformation> m_splineInfo;
  bool m_morphTF;

  ClipInformation m_clipInfo;
  LightingInformation m_lightInfo;

  //-- keyframe interpolation parameters
  int m_interpVolumeBounds;
  int m_interpCameraPosition;
  int m_interpCameraOrientation;
  int m_interpTF;
  int m_interpClipInfo;
  int m_interpLightInfo;
};

#endif
